<!doctype html> 
<html> 
<head> 
    <meta charset="utf-8"> 
    <title></title> 
</head>
<body>
<script type="text/javascript">

var a = '123';
//321
//'312';
alert(a.split('').reverse().join(''));
/*
var b = a.split('');
b.unshift(b.pop());
alert(b.join(''));
*/


	
	
</script>
</body>
</html>